﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication3
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            
        }
        private void MainForm_MouseClick(object sender, MouseEventArgs e)
        {
           // NewForm newform = new NewForm();
            //newform.Show();
        }

        private void MainForm_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            //消息框
            DialogResult result = MessageBox.Show("是否打开新窗体?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if(result == DialogResult.Yes)
            {
                NewForm form = new NewForm();
                form.Show();
            }else
            {
                this.Close();
            }

        }
    }

   
}
